package jackson.src.day01;

/*
 * Author: JacksonCoder
 * FileName: studentScores
 * Version: 1.0.0
 */
public class studentScores {

    public static void main(String[] args) {
        // 用二维数组表示的学生成绩:
        int[][] scores = {
                { 82, 90, 91 }, // 学生甲的语数英成绩
                { 68, 72, 64 }, // 学生乙的语数英成绩
                { 95, 91, 89 }, // ...
                { 67, 52, 60 },
                { 79, 81, 85 },
        };
        double average = 0;
        int studentAverage = 0;
        int scoresLength = scores.length;
        for(int[] score: scores){
            average = 0;

            int studentSUm = 0;
            for(int subject : score){
                studentSUm += subject;
            }
            average = studentSUm / 3;
            average += studentAverage;


        }
        average = average / scoresLength;
        System.out.println(average);
        if (Math.abs(average - 77.733333) < 0.000001) {
            System.out.println("测试成功");
        } else {
            System.out.println("测试失败");
        }



    }

}
